package com.ruoyi.material.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.material.mapper.MaterialWarehouseMapper;
import com.ruoyi.material.domain.MaterialWarehouse;
import com.ruoyi.material.service.IMaterialWarehouseService;

/**
 * 仓库管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-23
 */
@Service
public class MaterialWarehouseServiceImpl implements IMaterialWarehouseService 
{
    @Autowired
    private MaterialWarehouseMapper materialWarehouseMapper;

    /**
     * 查询仓库管理
     * 
     * @param warehouseId 仓库管理主键
     * @return 仓库管理
     */
    @Override
    public MaterialWarehouse selectMaterialWarehouseByWarehouseId(Long warehouseId)
    {
        return materialWarehouseMapper.selectMaterialWarehouseByWarehouseId(warehouseId);
    }

    /**
     * 查询仓库管理列表
     * 
     * @param materialWarehouse 仓库管理
     * @return 仓库管理
     */
    @Override
    public List<MaterialWarehouse> selectMaterialWarehouseList(MaterialWarehouse materialWarehouse)
    {
        return materialWarehouseMapper.selectMaterialWarehouseList(materialWarehouse);
    }

    /**
     * 新增仓库管理
     * 
     * @param materialWarehouse 仓库管理
     * @return 结果
     */
    @Override
    public int insertMaterialWarehouse(MaterialWarehouse materialWarehouse)
    {
        return materialWarehouseMapper.insertMaterialWarehouse(materialWarehouse);
    }

    /**
     * 修改仓库管理
     * 
     * @param materialWarehouse 仓库管理
     * @return 结果
     */
    @Override
    public int updateMaterialWarehouse(MaterialWarehouse materialWarehouse)
    {
        return materialWarehouseMapper.updateMaterialWarehouse(materialWarehouse);
    }

    /**
     * 批量删除仓库管理
     * 
     * @param warehouseIds 需要删除的仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialWarehouseByWarehouseIds(Long[] warehouseIds)
    {
        return materialWarehouseMapper.deleteMaterialWarehouseByWarehouseIds(warehouseIds);
    }

    /**
     * 删除仓库管理信息
     * 
     * @param warehouseId 仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialWarehouseByWarehouseId(Long warehouseId)
    {
        return materialWarehouseMapper.deleteMaterialWarehouseByWarehouseId(warehouseId);
    }
}
